package com.itzmn.java.javase.collections.interfaces;

/**
 * @Author: 张梦楠
 * @Date: 2018/12/6 15:59
 * 简书：https://www.jianshu.com/u/d611be10d1a6
 * 码云：https://gitee.com/zhangqiye
 * @Description:
 */
public interface QiYeDeque<T> {

    T getFirst();
    T getLast();

    /**
     *  没有异常
     * @return
     */
    T peekFirst();
    T peekLast();


    void addFirst(T e);
    void addLast(T e);

    boolean offerFirst(T e);
    boolean offerLast(T e);

    T removeFist();
    T removeLast();

    /**
     *  不会抛出异常
     * @return
     */
    T pollFirst();
    T pollLast();

}
